home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / SoundAndMusic / cmix / lib / octcps.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-02-25  |  150 b   |  10 lines

  1. #include <math.h>
  2.  
  3. float octcps(cps)
  4. float cps;
  5. {
  6.     return(log(cps/1.021975)/.69314718);
  7.  
  8.     /* .69etc is log of 2., 1.02etc is offset for middle C */
  9. }
  10.